﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public static class WwwManager
{
    public static void Load(string path, System.Action<WWW> callback)
    {
        MyEventObject.instance.StartCoroutine(Load2(path, callback));
    }

    static IEnumerator Load2(string path, System.Action<WWW> callback)
    {
        WWW www = new WWW(path);
        while (!www.isDone)
        {
            yield return null;
        }

        callback(www);
    }
}
